import React,{ Component } from 'react';
import center from '../css/indexCenter.css';//使用require导入css文件
import webData from './webData.json';  //导入json文件
import IndexItem from './indexItem.js';
export default class IndexCenter extends React.Component{
    constructor(){
        super();
        this.state = {
            webData : webData
        };
    }
    render(){
    	let itemsData = this.state.webData.webName;
    	let items = [];
		itemsData.forEach(function (value) {
			items.push(<IndexItem items={value} />)
		});
        return (
			<div className={center.conDiv}>
				<div className={center.searchDiv}>
					<div className={center.input_search}>
						<input className={center.input_title} type="text" ref="input_title" placeholder="请输入搜索内容..." />
						<a type="button" title="搜索" className={center.search_button} ref="search_button"></a>
					</div>
				</div>
				<div className="col-xs-12 col-sm-12 col-md-12 col-lg-12">
					<div className={center.leftDiv}>
						<ul className={center.fatherUl}>{items}</ul>
					</div>
				</div>
			</div>
        );
    }
}
